package demo1_a;

public class Test {
    public  static void drawMap(Shape shape){
        shape.draw();
    }

    public static void main(String[] args) {
        //抽象类不能进行实例化
        //Shape shape = new Shape();
        Shape shape1 = new Rect();

        drawMap(shape1);
        drawMap(new Cycle());//匿名对象,只能用一次

        shape1.draw();
        new Rect().draw();
    }
}
